<template>
	<view class="page">
		<view class="container">
		        <view class="rowTitle">{{language.accessRecordDetail.label1}}</view>
		        <view class="row" >
		            <!-- <view class="label">头像：</view> -->
					<u-image :showLoading="true" style="margin-left:50rpx;" :src="imgBaseUrl3+detail.snapLink" width="360rpx" height="360rpx"></u-image>
		        </view>
		        <view class="rowTitle">{{language.accessRecordDetail.label2}}</view>
		        <view class="row">
		          <view class="label">{{language.accessRecordDetail.label3}}：</view>
		          <text class="text">{{detail.cardNo?detail.cardNo:'--'}}</text>
		        </view>
		         <view class="row">
		          <view class="label">{{language.accessRecordDetail.label4}}：</view>
		          <text class="text">{{detail.accessDate?detail.accessDate:'--'}}</text>
		        </view>
		        <view class="row">
		            <view class="label">{{language.accessRecordDetail.label5}}：</view>
		            <text class="text">{{detail.accessMethod==1 ? '刷脸' : '刷卡'}}</text>
		        </view>
				<view class="row">
				    <view class="label">{{detail.channelName?language.accessRecordDetail.label6 : language.accessRecordDetail.label7}}：</view>
				    <text class="text">{{detail.channelName?detail.channelName : detail.deviceName}}</text>
				</view>
		</view>
	</view>
</template>

<script>
	import {acAccessRecordQueryByIdApi} from '@/common/api/commonApi/safeApi.js'
	export default {
		data() {
			return {
				detail:{},
				id: '',
				
			}
		},
		components:{
		},
		methods: {
			getList(){
				let params = this.params
				if(!params.endTime) delete params.endTime
				if(!params.beginTime) delete params.beginTime
				if(!params.transChannl) delete params.transChannl
				cardOperationlistApi(params).then(res=>{
					if(params.currPage==1) this.list = []
					this.list = this.list.concat(res.page.list)
					this.total = res.page.totalCount
				})
			},
			getDetail(){
				acAccessRecordQueryByIdApi({
					id: this.id
				}).then(res=>{
					this.detail = res.result
				})
			}
		},
		onLoad({id}) {
			this.setPageTitle(this.language.accessRecordDetail.title)
			this.detail = this.$Route.query.item
			this.id = this.$Route.query.id
			console.log('id='+this.id)
			console.log('id='+id)
			if(this.id) this.getDetail()
			// console.log(this.$Route.query.item);
		},
		onShow() {
			
		},
	}
</script>

<style lang="scss" scoped>
.page{
	background-color: #f1f1f1;
	.container {
	    height: 100%;
	    background-color: #fff;
	}
	.row {
	    width: 100%;
	    padding: 20rpx 20rpx;
	    display: flex;
	    align-items: center;
	    /* border-top: 2rpx solid #e6e6e6; */
	}
	
	.text {
	    width: 100%;
	    height: fit-content;
	    color: #333;
	}
	
	.label {
	    color: #9e9e9e;
	    width: 260rpx;
	    margin-left: 30rpx;
	}
	
	.rowTitle {
	    padding: 20rpx;
	    margin: 0 30rpx;
	    position: relative;
	    border-top: 2rpx solid #e6e6e6;
	}
	
	.rowTitle::after {
	    content: '';
	    position: absolute;
	    top: 50%;
	    left: 0rpx;
	    transform: translateY(-50%);
	    width: 7rpx;
	    height: 36rpx;
	    background: #4089f0;
	}
		
}
</style>
